FROM composer:1.10

LABEL maintainer="chenwenlong <chenwenlong@epweike.com>"

# repositorie mirror、timezone
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories ; \
    apk add --no-cache --virtual .timezone-deps tzdata; \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ; \
    echo 'Asia/Shanghai' > /etc/timezone; \
    rm -rf /var/cache/apk/* /tmp/* /var/tmp/* /var/lib/apt/lists/*

RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

# 安装 git + SSL ca certificates.
RUN apk update; \
    apk add --no-cache git ca-certificates; \
    update-ca-certificates; \
    rm -rf /var/cache/apk/* /tmp/* /var/tmp/* /var/lib/apt/lists/*